#pragma once
# include "Hash.h"

namespace xx
{
	template<class K,class V>
	class unordered_map
	{ 
		struct unmapRekey
		{
			K operator()(pair<K, V> kv)
			{
				return kv.first;
			}
		};
	public:
		typename typedef  HashTable<K, pair<K, V>, unmapRekey>::Iterator iterator;
		typename typedef  HashTable<K, pair<K, V>, unmapRekey>::const_Iterator const_iterator;
		iterator Begin()
		{
			return _ht.begin();
		}
		const_iterator Begin() const
		{
			return _ht.begin();
		}
		iterator end()
		{
			return _ht.End();
		}
		const_iterator end() const
		{
			return _ht.End();
		}
		bool insert(pair<K, V>& kv)
		{
			return _ht.insert(kv);
		}
		

	private:
		HashTable<K, pair<K, V>, unmapRekey> _ht;
	};
}
